package com.qf.web;

import com.qf.bean.Menu;
import com.qf.bean.Users;
import com.qf.service.UsersSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 2019/12/6
 * Administrator
 * springboot1206
 * 面向对象面向君  不负代码不负卿
 */
@RestController
public class UsersController {

    @Autowired
    private UsersSevice usersSevice;

    @RequestMapping("/getusers")
    public Map getall(){
        System.out.println("getall-controller");
        List<Users> getall = usersSevice.getall();
        List<Menu> menuList = usersSevice.getmenus();
        HashMap map = new HashMap();
        map.put("us",getall);
        map.put("ms",menuList);
        return map;
    }
}
